package cn.stylefeng.guns.sys.modular.system.mapper;

import cn.stylefeng.guns.sys.modular.system.entity.BtyBxd;
import cn.stylefeng.guns.sys.modular.system.entity.BtyDbdk;
import cn.stylefeng.guns.sys.modular.system.entity.BtyEkb;
import cn.stylefeng.guns.sys.modular.system.model.params.BtyEkbParam;
import cn.stylefeng.guns.sys.modular.system.model.result.BtyEkbResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liuy
 * @since 2021-08-09
 */
public interface BtyEkbMapper extends BaseMapper<BtyEkb> {

    /**
     * 获取列表
     *
     * @author liuy
     * @Date 2021-08-09
     */
    List<BtyEkbResult> customList(@Param("paramCondition") BtyEkbParam paramCondition);

    void updateByCode(@Param("paramCondition") BtyEkbParam paramCondition);

    /**
     * 获取map列表
     *
     * @author liuy
     * @Date 2021-08-09
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") BtyEkbParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author liuy
     * @Date 2021-08-09
     */
    Page<BtyEkbResult> customPageList(@Param("page") Page page, @Param("paramCondition") BtyEkbParam paramCondition);

    Page<BtyEkbResult> customPageZxList(@Param("page") Page page, @Param("paramCondition") BtyEkbParam paramCondition);


    /**
     * 获取分页map列表
     *
     * @author liuy
     * @Date 2021-08-09
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") BtyEkbParam paramCondition);

    /**
     *设置供货商openid
     */
    int setOpenid(@Param("openid") String openid, @Param("fkr") String xm, @Param("yhk") String yhk);

    List<BtyEkbResult> sumZcje(@Param("openid") String openid, @Param("beginTime") String beginTime, @Param("endTime") String endTime);
    List<BtyEkbResult> sumWbxje(@Param("openid") String openid, @Param("beginTime") String beginTime, @Param("endTime") String endTime);
    List<BtyEkbResult> sumJe(@Param("openid") String openid, @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    boolean insertEkb(List<BtyEkb> sub);

}
